//
//  SetTableVC.m
//  PersonalOC
//
//  Created by 韩琴 on 2018/8/27.
//  Copyright © 2018年 韩琴. All rights reserved.
//

#import "SetTableVC.h"
#import "PersonalInfoTableVC.h"
@interface SetTableVC ()
@property (weak, nonatomic) IBOutlet UIImageView *avatarImageView;
@end

@implementation SetTableVC

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title = @"设置";
    if ([_userModel.headPicUrl ly_isValidUrl]) {
        [LYTools sd_setImageWithimageView:self.avatarImageView withImageUrl:_userModel.headPicUrl withPlaceholderImage:LY_default_avavtar withCompleted:nil];
    } else {
        self.avatarImageView.image = LY_IMAGE_NAMED(_userModel.headPicUrl);
    }
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)viewWillAppear:(BOOL)animated {
    self.tabBarController.tabBar.hidden = YES;
}
- (IBAction)OutofLogin:(id)sender {
    [UserShare outLogin:nil];
    [self popVc];
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    [tableView deselectRowAtIndexPath:indexPath animated:YES];
    if (indexPath == [NSIndexPath indexPathForItem:0 inSection:0]) {
        PersonalInfoTableVC *set = [[UIStoryboard storyboardWithName:@"MyStoryboard" bundle:nil] instantiateViewControllerWithIdentifier:@"PersonalInfoTableVC"];
        [self.navigationController pushViewController:set animated:true];
    }
}
@end
